package com.best.oasis.settlement.service.sample;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.best.oasis.settlement.common.entity.sample.Sample;
import com.best.oasis.settlement.common.so.sample.SampleSO;
import com.best.oasis.settlement.common.vo.sample.SampleVO;
import com.best.oasis.settlement.dao.sample.SampleDao;
import com.best.oasis.settlement.service.base.BaseServiceImpl;
import com.best.oasis.settlement.util.page.PageList;

@Service
public class SampleServiceImpl extends BaseServiceImpl<Sample, SampleVO, Long> implements SampleService {
	@Autowired
    private SampleDao sampleDao;
    
    @Override
    public void afterConstruct() {
        super.setBaseDao(sampleDao);
        super.setEntityClass(Sample.class);
        super.setEntityVOClass(SampleVO.class);

    }

	@SuppressWarnings("unchecked")
	@Override
	public PageList<SampleVO> getPageList(SampleSO so) {
		PageList<SampleVO> result = new PageList<SampleVO>();
        result = orikaBeanMapper.convertPageList(sampleDao.getPageList(so), entityVOClass);
        return result;
	}

}
